package com.allwees.bs.module.fms.req;

import com.allwees.bs.core.modelbase.req.Req;
import com.allwees.bs.core.modelbase.validate.ValidateItem;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.util.CollectionUtils;

import java.math.BigDecimal;
import java.util.Set;

@Data
@EqualsAndHashCode(callSuper = true)
public class DoBatchWithdrawReq extends Req {

    private Set<String> accountLogUuids;

    private BigDecimal exchangeRate;

    @Override
    public ValidateItem[] getValidateItems() {
        return new ValidateItem[] {
                new ValidateItem(CollectionUtils.isEmpty(accountLogUuids), "accountLogUuids不能为空"),
                new ValidateItem(exchangeRate == null, "提现汇率不能为空")
        };
    }
}
